const { number, date } = require('joi')
const mongoose = require('mongoose')
let Schema = mongoose.Schema
let usersSchema = new Schema({
  _id:{
    type:String,
    required:true
  },
  nickname:{
    type:String,
    required:true
  },
  phone:{
    type:Number,
    required:true
  },
  avatar:{ type: String, default: 'https://oss.li586543.cn/1.png' },
  email:String,
  register_time:{ type: Number, default: Date.now() },
  last_time:{type: Number},
  birthday:{ type: Number, default: Date.now() },
  age:Number,
  status:{ type: Number, default:0 }
})
//创建Model对象
let users = mongoose.model('users', usersSchema)
module.exports = users